package com.karry.yl.service.system;

import com.karry.commons.base.SuperService;
import com.karry.commons.vo.PermissionTreeNode;
import com.karry.yl.domain.system.Role;

import java.util.List;


public interface RoleService extends SuperService<Role> {

    /**
     * 保存角色及其权限
     * @param role
     * @param resourcesCodes
     */
    void insert(Role role, String[] resourcesCodes);


    /**
     * 保存角色及其权限
     * @param role
     * @param resourcesCodes
     */
    void update(Role role, String[] resourcesCodes);


    /**
     * 获取权限树
     * @param roleId
     * @return
     */
    List<PermissionTreeNode> permissionTree(Long roleId,Integer nature);

    void delete(List<Long> ids);

}
